<!--菜单搜索功能-->
<!--先写静态页面-->
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>Green-download</title>
    <style>
        * {
            box-sizing: border-box;
        }
        
        .container {
            padding: 10px;
        }
        
        .dnav {
            float: left;
            padding: 5px;
            background: grey;
        }
        
        .dnav ul {
            list-style-type: none;
            margin: 10px;
            padding: 0px;
        }
        
        .dnav ul li {
            height: 20px;
        }
        
        .dnav ul li a {
            padding: 10px;
            margin: 20px;
            text-decoration: none;
            font-size: 18px;
            color: black;
            display: block
        }
        
        .dnav ul li a:hover {
            color: white;
        }
        
        .dnav input {
            width: 100%;
            font-size: 18px;
            padding: 11px;
            border: 1px solid #ddd;
        }
        
        .content {
            float: left;
            width: 70%;
            padding: 5px;
            background: lightgrey;
        }
    </style>
</head>

<body>
    <div class="container">
        <!--左右布局的实例-->
        <div class="dnav">
            <nav class="nav">
                <h2>索引
                    <h2>
                        <input placeholder="请输入关键字" id="mysearch" onkeyup="search()">
                        <ul>
                            <LI>
                                <a href="javascript:history.back(-1)">BACK</a>
                            </LI>
                            <li>
                                <a href="./Eclipse/EclipseDownload.html">DOWNLOAD</a>

                            </li>
                            <LI>
                                <a href="./Eclipse/plug-in-unit.html">plug-in unit[插件]</a>
                            </LI>
                        </ul>
            </nav>
        </div>
        <div class="content">
            <h1>----Eclipse----</h1>
            <h2>_What is it?></h2>
            <h3>CN:</h3>
            <p>Eclipse是著名的跨平台开源集成开发环境（IDE）。最初主要用来Java语言开发，目前亦有人通过插件使其作为C++、Python、PHP等其他语言的开发工具。 Eclipse的本身只是一个框架平台，但是众多插件的支持，使得Eclipse拥有较佳的灵活性，所以许多软件开发商以Eclipse为框架开发自己的IDE。

            </p>
            <H3>EN:</H3>
            <P>Eclipse is a famous cross platform open source integrated development environment (IDE). At first, it was mainly used for Java language development. At present, some people use it as a development tool for C + +, python, PHP and other languages
                through plug-ins. Eclipse itself is just a framework platform, but the support of many plug-ins makes eclipse more flexible, so many software developers develop their own ide based on eclipse.</P>

        </div>
    </div>
    <script>
        //功能：主要是过滤，通过转换为大写toUpperCase,然后用indexOff来查询返回字符串位子，无就返回-1
        function search() {
            var input = document.getElementById("mysearch").value;
            var li = document.getElementsByTagName("li");
            var fliter = input.toUpperCase();
            for (var i = 0; i < li.length; i++) {
                if (li[i].innerHTML.toUpperCase().indexOf(fliter) > -1) {
                    li[i].style.display = "block";
                } else {
                    li[i].style.display = "none";
                }

            }

        }
    </script>
</body>

</html>